<script>

function listenRequests(request, sender, sendResponse) {
 
    if (request.method == "getValue")
      sendResponse({'value':localStorage[request.key]});
    else
      sendResponse({}); // snub them.
}

chrome.extension.onRequest.addListener(listenRequests);
  
chrome.tabs.onUpdated.addListener(function(tabId, change, tab) {
  if (change.status == "complete") {

  }
});


chrome.tabs.onSelectionChanged.addListener(function(tabId, info) {

});


</script>
